<?php

namespace frontend\modules\yii\models;

use Yii;

/**
 * This is the model class for table "frame_navs".
 *
 * @property int $id
 * @property string $label The label of nav.
 * @property string $url The url of nav.
 * @property string $location The location of this nav. head or left
 * @property int $pid The parent nav id.
 */
class FrameNavs extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'frame_navs';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['pid'], 'integer'],
            [['label', 'location'], 'string', 'max' => 20],
            [['url'], 'string', 'max' => 500],
            [['url', 'label'], 'required'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'label' => 'Label',
            'url' => 'Url',
            'location' => 'Location',
            'pid' => 'Pid',
        ];
    }
}
